import os
from datetime import datetime

from pytz import timezone


def get_date_time(time_format="%Y-%m-%d %H:%M:%S", remove_tz: bool = True):
    date_and_time = datetime.now().replace(microsecond=0)

    if remove_tz:
        date_and_time = date_and_time.replace(tzinfo=None)
    else:
        date_and_time = date_and_time.astimezone(timezone("Europe/Moscow"))

    return date_and_time


async def get_destination_path(directory: str) -> str:
    return os.path.join(
        os.path.dirname(os.path.dirname(os.path.dirname(__file__))), directory
    )
